package com.un.ebs.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.un.ebs.sys.domain.Ent;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * (Ent)表数据库访问层
 *
 * @author liubo
 * @since 2020-08-18 16:57:31
 */
public interface EntMapper extends BaseMapper<Ent> {

    @Select("select top 1 id from sys_ent where name = #{name} order by create_time")
    String exist(@Param("name") String name);

    @Update("update sys_ent set is_delete=0 where id=#{id}")
    void unDelete(@Param("id") String id);
}